﻿using SQ.Domain;
using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SQ.Infrastructure.Mappings
{
    public class FilaMap : EntityTypeConfiguration<Fila>
    {
        public FilaMap()
        {
            ToTable("TB_FILA");

            HasKey(p => p.Id);
            Property(p => p.Id).IsRequired().HasColumnName("ID_FILA");

            Property(p => p.DataInicioFila).IsRequired().HasColumnName("DAT_INIO_FILA").HasColumnType("DATETIME2");
            Property(p => p.DataFimFila).HasColumnName("DAT_FIM_FILA").HasColumnType("DATETIME2");

            Property(p => p.TempoEsperaMedio).IsOptional().HasColumnName("TEMP_MEDIO_ESPERA");

        }
    }
}
